package com.shelpe.services.sinbad.entity.jpa;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.shelpe.services.sinbad.controller.LogDto.LogNoteable;
import com.shelpe.services.sinbad.entity.jpa.RptKeywordAnalysis.RptKeywordAnalysisPK;

import lombok.Data;

@Entity(name = "rpt_keyword_analysis")
@IdClass(RptKeywordAnalysisPK.class)
@Data
public class RptKeywordAnalysis implements LogNoteable {

	@Id
	@Column(name = "taobao_user_id")
	private long userID;
	@Id
	@JsonIgnore
	private long keywordNo;
	@Id
	private int source;// 流量来源( PC:12 , mobile:45)

	private String keywordstr;

	private int click;
	private int favCount;
	private int payCount;
	private int payTotal;
	private int cartCount;
	private Date createTime;

	@Data
	public static class RptKeywordAnalysisPK implements Serializable {
		private static final long serialVersionUID = 1L;
		@Id
		@Column(name = "taobao_user_id")
		private long userID;
		@Id
		private long keywordNo;
		@Id
		private int source;
	}
}
